import request from '@/utils/request'

// 分页查询
export function page(params) {
  return request({
    url: '/course/page',
    method: 'get',
    params
  })
}

// 新增
export function add(data) {
  return request({
    url: '/course',
    method: 'post',
    data
  })
}

// 修改
export function update(data) {
  return request({
    url: '/course',
    method: 'put',
    data
  })
}

// 根据id删除
export function deleteById(id) {
  return request({
    url: `/course/${id}`,
    method: 'delete'
  })
}

// 根据id查询
export function selectById(id) {
  return request({
    url: `/course/${id}`,
    method: 'get'
  })
}